#include<stdio.h>
void swap(int *p1, int *p2)
{
	int t;
	t=*p1, *p1=*p2, *p2=t;
}
/*design a function to sort three numbers*/
void sort(int *p1,int *p2,int *p3)
{
	if( *p1 < *p2 )    swap( p1,  p2 );
	if( *p1 < *p3 )   swap( p1,  p3 );
	if( *p2 < *p3 )   swap( p2,  p3 );
}
main()
{
	int n1,n2,n3;
	printf("Input three numbers:");
	scanf("%d%d%d", &n1, &n2,&n3);
	sort(&n1,&n2,&n3);
	printf("sort numbers:%d,%d,%d\n",n1,n2,n3);
}

